package org.csu.mybigpro.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Data
@TableName(value = "exam", autoResultMap = true)
public class Exam implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String title;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Map<String, Object>> questions;

    private String status; // DRAFT, PUBLISHED, FINISHED

    private Integer durationInMinutes;

    private LocalDateTime startTime;

    private LocalDateTime createdAt;

    private static final long serialVersionUID = 1L;
}